package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TabWalletGameMapper;
import com.ruoyi.system.domain.TabWalletGame;
import com.ruoyi.system.service.ITabWalletGameService;
import com.ruoyi.common.core.text.Convert;

/**
 * 钱包游戏管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-09
 */
@Service
public class TabWalletGameServiceImpl implements ITabWalletGameService 
{
    @Autowired
    private TabWalletGameMapper tabWalletGameMapper;

    /**
     * 查询钱包游戏管理
     * 
     * @param id 钱包游戏管理主键
     * @return 钱包游戏管理
     */
    @Override
    public TabWalletGame selectTabWalletGameById(Long id)
    {
        return tabWalletGameMapper.selectTabWalletGameById(id);
    }

    @Override
    public TabWalletGame selectByWalletAddress(String walletAddress) {
        return tabWalletGameMapper.selectByWalletAddress(walletAddress);
    }

    /**
     * 查询钱包游戏管理列表
     * 
     * @param tabWalletGame 钱包游戏管理
     * @return 钱包游戏管理
     */
    @Override
    public List<TabWalletGame> selectTabWalletGameList(TabWalletGame tabWalletGame)
    {
        return tabWalletGameMapper.selectTabWalletGameList(tabWalletGame);
    }

    /**
     * 新增钱包游戏管理
     * 
     * @param tabWalletGame 钱包游戏管理
     * @return 结果
     */
    @Override
    public int insertTabWalletGame(TabWalletGame tabWalletGame)
    {
        tabWalletGame.setCreateTime(DateUtils.getNowDate());
        return tabWalletGameMapper.insertTabWalletGame(tabWalletGame);
    }

    /**
     * 修改钱包游戏管理
     * 
     * @param tabWalletGame 钱包游戏管理
     * @return 结果
     */
    @Override
    public int updateTabWalletGame(TabWalletGame tabWalletGame)
    {
        tabWalletGame.setUpdateTime(DateUtils.getNowDate());
        return tabWalletGameMapper.updateTabWalletGame(tabWalletGame);
    }

    /**
     * 批量删除钱包游戏管理
     * 
     * @param ids 需要删除的钱包游戏管理主键
     * @return 结果
     */
    @Override
    public int deleteTabWalletGameByIds(String ids)
    {
        return tabWalletGameMapper.deleteTabWalletGameByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除钱包游戏管理信息
     * 
     * @param id 钱包游戏管理主键
     * @return 结果
     */
    @Override
    public int deleteTabWalletGameById(Long id)
    {
        return tabWalletGameMapper.deleteTabWalletGameById(id);
    }
}
